
import java.awt.Cursor;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

public class exit extends JLabel implements MouseListener
{
	static ImageIcon exitImage = new ImageIcon("images/exit.png");

	public exit()
	{
		super(exitImage);
		setBounds(670, 480, 60, 60);
		setCursor(new Cursor(12));
		addMouseListener(this);
	}

	public void mouseClicked(MouseEvent e)
	{
	}

	public void mouseEntered(MouseEvent e)
	{
		ImageIcon exitImage = new ImageIcon("images/exitHover.png");
		setIcon(exitImage);
	}

	public void mouseExited(MouseEvent e)
	{
		setIcon(exitImage);
	}

	public void mousePressed(MouseEvent e)
	{
	}

	public void mouseReleased(MouseEvent e)
	{
		System.exit(0);
	}

}
